package com.elric.mall.dto;

import java.util.Objects;

/**
 * 代码生成详细配置
 */
public class SysCodeGenerateConfig {

    /**
     * 主键
     */
    private Long id;

    /**
     * 代码生成主表ID
     */
    private Long codeGenId;

    /**
     * 数据库字段名
     */
    private String columnName;

    /**
     * 字段描述
     */
    private String columnComment;

    /**
     * 字典code
     */
    private String dictTypeCode;

    /**
     * 列表是否缩进（字典）
     */
    private String whetherRetract;

    /**
     * 是否必填（字典）
     */
    private String whetherRequired;

    /**
     * 是否是查询条件
     */
    private String queryWhether;

    /**
     * 查询方式
     */
    private String queryType;

    /**
     * 列表显示
     */
    private String whetherTable;

    /**
     * 主外键
     */
    public String columnKey;

    /**
     * 首字母大写名称（用于代码生成get set方法）
     */
    public String columnKeyName;

    /**
     * 数据库中类型（物理类型）
     */
    public String dataType;

    /**
     * java类型
     */
    private String javaType;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCodeGenId() {
        return codeGenId;
    }

    public void setCodeGenId(Long codeGenId) {
        this.codeGenId = codeGenId;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public void setColumnComment(String columnComment) {
        this.columnComment = columnComment;
    }

    public String getDictTypeCode() {
        return dictTypeCode;
    }

    public void setDictTypeCode(String dictTypeCode) {
        this.dictTypeCode = dictTypeCode;
    }

    public String getWhetherRetract() {
        return whetherRetract;
    }

    public void setWhetherRetract(String whetherRetract) {
        this.whetherRetract = whetherRetract;
    }

    public String getWhetherRequired() {
        return whetherRequired;
    }

    public void setWhetherRequired(String whetherRequired) {
        this.whetherRequired = whetherRequired;
    }

    public String getQueryWhether() {
        return queryWhether;
    }

    public void setQueryWhether(String queryWhether) {
        this.queryWhether = queryWhether;
    }

    public String getQueryType() {
        return queryType;
    }

    public void setQueryType(String queryType) {
        this.queryType = queryType;
    }

    public String getWhetherTable() {
        return whetherTable;
    }

    public void setWhetherTable(String whetherTable) {
        this.whetherTable = whetherTable;
    }

    public String getColumnKey() {
        return columnKey;
    }

    public void setColumnKey(String columnKey) {
        this.columnKey = columnKey;
    }

    public String getColumnKeyName() {
        return columnKeyName;
    }

    public void setColumnKeyName(String columnKeyName) {
        this.columnKeyName = columnKeyName;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public String getJavaType() {
        return javaType;
    }

    public void setJavaType(String javaType) {
        this.javaType = javaType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysCodeGenerateConfig that = (SysCodeGenerateConfig) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(codeGenId, that.codeGenId) &&
                Objects.equals(columnName, that.columnName) &&
                Objects.equals(columnComment, that.columnComment) &&
                Objects.equals(dictTypeCode, that.dictTypeCode) &&
                Objects.equals(whetherRetract, that.whetherRetract) &&
                Objects.equals(whetherRequired, that.whetherRequired) &&
                Objects.equals(queryWhether, that.queryWhether) &&
                Objects.equals(queryType, that.queryType) &&
                Objects.equals(whetherTable, that.whetherTable) &&
                Objects.equals(columnKey, that.columnKey) &&
                Objects.equals(columnKeyName, that.columnKeyName) &&
                Objects.equals(javaType, that.javaType) &&
                Objects.equals(dataType, that.dataType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, codeGenId, columnName, columnComment, dictTypeCode, whetherRetract, whetherRequired, queryWhether, queryType, whetherTable, columnKey, columnKeyName, dataType, javaType);
    }
}
